Kwik.Page.include("Kwik.Data.ColumnCollection.js");
Kwik.Page.include("Kwik.Data.RowCollection.js");
Kwik.Page.include("Kwik.Data.TableCollection.js");
Kwik.Page.include("Kwik.Data.CommandCollection.js");


/**
* Data table object, joins rows and columns
* @extends Kwik.Object
* @requires Kwik.Object
* @requires Kwik.Data.ColumnCollection
* @requires Kwik.Data.RowCollection
* @requires Kwik.Data.TableCollection
* @requires Kwik.Data.CommandCollection
* @requires Kwik.Object
* @constructor
* @created 12:37 AM 7/29/2009
* @modified 12:37 AM 7/29/2009
*/
Kwik.Data.Table = function(config)
{
	/** @ignore */
	Kwik.Utility.extend(this, "Kwik.Object");
	this.__class.push("Kwik.Data.Table");

	/** Reference to a parent object if any @type Kwik.Data.TableCollection */
	this.parent = null;
	/** Table name @type String */
	this.name = "";
	/** Connectionstring for this table @type String */
	this.connectionString = "";

	/** Column collection for this table @type Kwik.Data.ColumnCollection */
	this.columns = new Kwik.Data.ColumnCollection({parent:this});
	/** Command collection for this table @type Kwik.Data.CommandCollection */
	this.commands = new Kwik.Data.CommandCollection({parent:this});
	/** Row collection for this table @type Kwik.Data.RowCollection */
	this.rows = new Kwik.Data.RowCollection({parent:this});

	/** Configure this table object @type Kwik.Data.TableConfig */
	this.configure = function Table_configure(config)
	{
		config = this.Kwik$Object.configure(config);
		if(config.parent){this.parent = config.parent;}
		if(config.name){this.name = config.name;}
		return config;
	};

	/** @ignore */
	this.main = function Table_main(config)
	{
		if(config){this.configure(config);}
	}; this.main(config);
};

/**
* Data table configuration object
* @constructor
* @created 12:37 AM 7/29/2009
* @modified 12:37 AM 7/29/2009
*/
Kwik.Data.TableConfig = function()
{
	/** Reference to a parent object if any @type Kwik.Data.TableCollection */
	this.parent = null;
	/** Table name @type String */
	this.name = "";
};